package cz.gillan.housecosts.data;

import java.text.DateFormat;
import java.util.Date;
import java.util.concurrent.atomic.AtomicLong;

public class StateImpl implements State {
	private Long id;
	private Long gaugeId;
	private Double state;
	private Date date;
	private String comment;
	
	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}
	
	/**
	 * @return the gaugeId
	 */
	public Long getGaugeId() {
		return gaugeId;
	}
	/**
	 * @param gaugeId the gaugeId to set
	 */
	public void setGaugeId(Long gaugeId) {
		this.gaugeId = gaugeId;
	}
	/* (non-Javadoc)
	 * @see cz.gillan.housecosts.data.State#getState()
	 */
	@Override
	public Double getState() {
		return state;
	}
	/**
	 * @param state the state to set
	 */
	public void setState(Double state) {
		this.state = state;
	}
	
	public String getFormatedDate() {
		return DateFormat.getInstance().format(getDate());
	}
	/* (non-Javadoc)
	 * @see cz.gillan.housecosts.data.State#getDate()
	 */
	@Override
	public Date getDate() {
		return date;
	}
	/**
	 * @param date the date to set
	 */
	public void setDate(Date date) {
		this.date = date;
	}
	/* (non-Javadoc)
	 * @see cz.gillan.housecosts.data.State#getComment()
	 */
	@Override
	public String getComment() {
		return comment;
	}
	/**
	 * @param comment the comment to set
	 */
	public void setComment(String comment) {
		this.comment = comment;
	}
}
